package com.inspur.dgov.vlbod.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 直播信息
 * </p>
 *
 * @author chiyupei
 * @since 2023-05-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("live_broadcast")
public class LiveBroadcast implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 直播主题
     */
    @TableField("title")
    private String title;

    /**
     * 开始时间
     */
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime startTime;

    /**
     * 时长（单位分钟）
     */
    @TableField("duration_time")
    private Integer durationTime;

    /**
     * 结束时间
     */
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime endTime;

    /**
     * 直播所在位置
     */
    @TableField("location")
    private String location;

    /**
     * 直播设备号
     */
    @TableField("nemo_number")
    private String nemoNumber;

    /**
     * 是否自动录制 0 否 1 开启
     */
    @TableField("auto_recording")
    private String autoRecording;

    /**
     * 是否自动发布录制0否 1开启
     */
    @TableField("auto_publish_recording")
    private String autoPublishRecording;

    /**
     * 简介
     */
    @TableField("brief_introduction")
    private String briefIntroduction;

    /**
     * 直播缩略图
     */
    @TableField("thumbnail")
    private String thumbnail;

    /**
     * 会议室密码（SM2加密存储）
     */
    @TableField("meeting_password")
    private String meetingPassword;

    /**
     * 小鱼会议室号码
     */
    @TableField("meeting_room_number")
    private String meetingRoomNumber;

    /**
     * 会议控制密码
     */
    @TableField("control_password")
    private String controlPassword;

    /**
     * 默认分辨率
     */
    @TableField("default_resolution")
    private String defaultResolution;

    /**
     * 直播附加配置
     */
    @TableField("extras_config")
    private String extrasConfig;

    /**
     * 直播ID,发布后小鱼生成
     */
    @TableField("live_id")
    private String liveId;

    /**
     * 直播流json数据
     */
    @TableField("push_urls")
    private String pushUrls;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 创建人姓名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 创建人组织机构编码
     */
    @TableField("organ_code")
    private String organCode;

    /**
     * 主讲人
     */
    @TableField("speaker")
    private String speaker;

    /**
     * 最后更新时间
     */
    @TableField("modify_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime modifyTime;

    /**
     * 直播状态位(0:未开始 1:直播中 2:暂停 3:结束)
     */
    @TableField("live_state")
    private String liveState;

    /**
     * 系统状态位 0 删除 1正常
     */
    @TableField("`status`")
    private String status;


}
